<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['围栏管理','进出围栏明细']" icon="fa fa-map-marker" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>

	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>进出围栏明细</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn railHtml">								
								<sa-company-tree-car companyTreeId="companyTree" (companySelected)="companySelected($event)"></sa-company-tree-car>

								<div class="top_module" style="min-width: auto;">
									<span class="module_text">类型</span>
									<select name="" id="" class="module_inp" [(ngModel)]="importType">
										<option value="1">进入围栏</option>
										<option value="2">离开围栏</option>
									</select>
								</div>

								<div class="selectDate top_module">
									<div class="input-daterange input-group s_selected_time_box s_hover_box">
										<input type="text" [(ngModel)]='startTime' class="form-control s_selected_time" id="datetimepicker1"  autocomplete="off" placeholder="选择开始时间"/>
										<span class="s_selected_time_spe">至</span>
										<input type="text" [(ngModel)]='endTime' class="form-control s_selected_time" id="datetimepicker2"  autocomplete="off" placeholder="选择结束时间"/>
										<div class="s_del_icon" (click)='del_date()'>x</div>
									</div>
								</div>

								<div class="top_module" style="min-width: auto;">
									<span class="module_text">围栏名称</span>
									<input class="module_inp" type="text" [(ngModel)]="railName" />
								</div>

								<div class="top_module" style="min-width: auto;">
									<span class="module_text">站点类别</span>
									<select name="" id="" class="module_inp" [(ngModel)]="siteType">
										<option value="1">装载点</option>
										<option value="2">卸载点</option>
									</select>
								</div>

								<div class="top_module">
									<span class="module_text">时间停留过滤</span>
									<input class="module_inp" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" [(ngModel)]="filterTime" placeholder=" 时间单位(分钟)" />
								</div>
								<button type="button" class="btn btn-primary" (click)="table_search()">查询</button>

							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>设备ID</th>
										<th>车牌号</th>
										<th>围栏名称</th>
										<th>公司名称</th>
										<th>进入围栏时间</th>
										<th>离开围栏时间</th>
										<!-- <th>开始上货时间</th>
										<th>结束上货时间</th>
										<th>装载量[吨]</th>
										<th>装载时间</th> -->
										<th>停留时间</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData">
										<td>{{row.deviceId}}</td>
										<td>{{row.carNumber}}</td>
										<td>
											<button type="button" (click)="jumpRailManage(row)"> {{row.name}}</button>
										</td>
										<td>{{row.companyName}}</td>
										<td>{{row.entertime}}</td>
										<td>{{row.leaveTime}}</td>
										<!-- <td>{{row.startloadingtime}}</td>
										<td>{{row.finishloadingtime}}</td>
										<td>{{row.weight}}</td>
										<td>{{row.loadingTime}}</td> -->
										<td>{{row.stopTime}}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>

</div>